﻿#ifndef BUSS_ADDMENU_H
#define BUSS_ADDMENU_H

#include <QWidget>
#include <QSqlQuery>
#include <QSqlDatabase>
#include <QDebug>

namespace Ui {
class Buss_addmenu;
}

class Buss_addmenu : public QWidget
{
    Q_OBJECT

public:
    explicit Buss_addmenu(int bus_id, QWidget *parent = nullptr);
    ~Buss_addmenu();
    void setBusiness_id(int bus_id);

signals:
    void menuAdded(); // 添加菜品完成信号

private slots:
    void on_pushButton_add_clicked();

    void on_label_picture_linkActivated(const QString &link);

    void on_pushButton_return_clicked();

private:
    Ui::Buss_addmenu *ui;
    QString m_imagePath; // 存储图片路径
    int m_currentStatus; // 添加状态ID存储
    int business_id;
    int bus_id;
    QSqlDatabase db;
    void setupDatabase();
};

#endif // BUSS_ADDMENU_H
